package com.ciklum.robotester;

import java.awt.*;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.TimeoutException;

/**
 * Created by miy on 7/4/2014.
 */
public interface IRobotesterApi {
    //Mouse api
    Point findControl(File file,long timeout) throws TimeoutException;

    boolean findControlAndClick(File file,long timeout) throws TimeoutException;
    boolean findControlAndClick(File file,MouseButton mouseButton,long timeout) throws TimeoutException;

    Point findControl(File file) throws TimeoutException;
    boolean findControlAndClick(File file) throws TimeoutException;

    void click(int x,int y,MouseButton mouseButton);
    void move(int x,int y);


    //Keyboard api
    void keyPress(int i);
    void keyPress(char i);
    void keyType(char i);
    void typeString(String s);


    // Our eyes
    boolean existsOnScreen(File file);
    Point waitForImage(File file,long timeout) throws TimeoutException;
    void waitForImageDisappear(File file,long timeout) throws TimeoutException;

    void setThroughput(double throughput);
}